package com.dyz.LeetCodeforSwordFingerOffer;

/**
 * @author: daiyizheng
 * @date: 2021/7/3 19:19
 * @description:
 */
public class ReverseLeftWords58 {
    public static void main(String[] args) {
        new ReverseLeftWords58().reverseLeftWords("abcdefg", 2);
    }
    public String reverseLeftWords(String s, int n) {
        if(s.length()<n||n<1){return s;}
        //
        StringBuilder sb = new StringBuilder(s);
        String s1 = sb.substring(0,n);
        String s2 = sb.substring(n, s.length());
        return s2+s1;
    }
}
